package com.jctrip.hotel.source.model.greentree.resp;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Author：Haruhi
 * @description:
 * @Date：2023/8/31 11:45
 * @Package：com.jctrip.hotel.source.model.greentree.resp
 * @Project：hotel-main
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JacksonXmlRootElement(localName = "GetRoomTypeList")
public class GetRoomTypeListResp extends GreenTreeBaseResp {


    @JacksonXmlProperty(localName = "ReqHotels")
    private ReqHotels reqHotels;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    public static class ReqHotels {
        @JacksonXmlProperty(localName = "ReqHotel")
        private ReqHotel reqHotel;

        // getter 和 setter 方法省略

        @Data
        @NoArgsConstructor
        @AllArgsConstructor
        @Builder
        public static class ReqHotel {
            @JacksonXmlProperty(localName = "HotelCode")
            private String hotelCode;

            @JacksonXmlProperty(localName = "ReqTypes")
            private ReqTypes reqTypes;

            // getter 和 setter 方法省略

            @Data
            @NoArgsConstructor
            @AllArgsConstructor
            @Builder
            public static class ReqTypes {
                @JacksonXmlElementWrapper(useWrapping = false)
                @JacksonXmlProperty(localName = "ReqType")
                private List<ReqType> reqTypeList;

                // getter 和 setter 方法省略

                @Data
                @NoArgsConstructor
                @AllArgsConstructor
                @Builder
                public static class ReqType {
                    @JacksonXmlProperty(localName = "roomTypeCode",isAttribute = true)
                    private String roomTypeCode;

                    @JacksonXmlProperty(localName = "roomTypeDescript",isAttribute = true)
                    private String roomTypeDescript;

                    @JacksonXmlProperty(localName = "breakfastFlag",isAttribute = true)
                    private String breakfastFlag;

                    @JacksonXmlProperty(localName = "RoomRate")
                    private RoomRate roomRate;

                    @JacksonXmlProperty(localName = "MktPrice")
                    private MktPrice mktPrice;

                    @JacksonXmlProperty(localName = "RoomComments")
                    private RoomComments roomComments;

                    @Data
                    @NoArgsConstructor
                    @AllArgsConstructor
                    @Builder
                    public static class RoomRate {
                        @JacksonXmlProperty(localName = "currencyCode",isAttribute = true)
                        private String currencyCode;

                        @JacksonXmlText
                        private BigDecimal roomrate;

                    }

                    @Data
                    @NoArgsConstructor
                    @AllArgsConstructor
                    @Builder
                    public static class MktPrice {
                        @JacksonXmlProperty(localName = "currencyCode",isAttribute = true)
                        private String currencyCode;

                        @JacksonXmlText
                        private BigDecimal value;

                    }

                    @Data
                    @NoArgsConstructor
                    @AllArgsConstructor
                    @Builder
                    public static class RoomComments {
                        @JacksonXmlProperty(localName = "totalrooms")
                        private Integer totalRooms;

                        @JacksonXmlProperty(localName = "person")
                        private Integer person;

                        @JacksonXmlProperty(localName = "bedtype")
                        private String bedType;

                        @JacksonXmlProperty(localName = "roomarea")
                        private String roomArea;

                        @JacksonXmlProperty(localName = "haswindows")
                        private Integer hasWindows;

                        @JacksonXmlProperty(localName = "nowindows")
                        private Integer noWindows;

                        @JacksonXmlProperty(localName = "darkwindows")
                        private Integer darkWindows;

                        @JacksonXmlProperty(localName = "addbeds")
                        private Integer addBeds;

                        @JacksonXmlProperty(localName = "internet")
                        private Boolean internet;

                        @JacksonXmlProperty(localName = "wifi")
                        private Boolean wifi;

                        @JacksonXmlProperty(localName = "secretaire")
                        private Boolean secretaire;

                        @JacksonXmlProperty(localName = "fridge")
                        private Boolean fridge;

                        @JacksonXmlProperty(localName = "garderobe")
                        private Boolean garderobe;

                        // getter 和 setter 方法省略
                    }
                }
            }
        }
    }
}